<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <link rel="stylesheet" href="./css/login.css">
    <link rel="stylesheet" href="./css/common.css">
    <script src="./js/JQuery2.1.4.js"></script>
</head>

<body>
    <div class="content">
        <div class="box">
            <form action="./user.html">
                <div class="item">
                    <div class="box1">
                        <a href="./index.html"><img src="./img/login-register/logo.png" alt=""></a>
                    </div>
                    <p>公共场所不建议自动登录，以防账号丢失</p>
                    <input type="text" placeholder="昵称/邮箱/手机号" name="uname">
                    <div class="box2">
                        <input type="password" placeholder="密码" id="password-check" name="password">
                        <img src="./img/login-register/open.png" alt="" id="eye">
                    </div>
                    <button type="submit">登录</button>

                </div>
                <div class="item2">
                    <a href="./register.html">免费注册</a>
                    <a href="">忘记密码？</a>
                </div>
            </form>

        </div>

    </div>
    <script>
        $(function () {
            var flag = 0
            $('#eye').click(
                function () {
                    if (flag == 0) {
                        $('#password-check').attr('type', 'text');
                        $('#eye').attr('src', './img/login-register/close.png');
                        flag = 1;
                    } else {
                        $('#password-check').attr('type', 'password');
                        $('#eye').attr('src', './img/login-register/open.png');
                        flag = 0;
                    }

                }
            )
        })

    </script>

</body>

</html>